$(function(){
    $.ajax({
        method:'get',
        url:' http://chst.vip:1234/api/getsitenav',
        success:function(res){
            let kongstr = ''
            res.result.forEach(element => {
                kongstr+=`<a href=${element.navHref}>
                             <li>
                                <img src="${element.navImg}" alt="">
                                <span>${element.navTitle}</span>
                            </li>
                          </a>`
            });
            $('main ul').html(kongstr)
        }
    })
    toTop2()
})